const Service = require('egg').Service;
class UserService extends Service {
    async find(uid) {
      // 假如 我们拿到用户 id 从数据库获取用户详细信息
      console.log('uid',uid);
      const user = await this.app.mysql.get('user', { id: 1 });
      return { user };
    }
    async insert(user) {
      console.log('user',user);
      console.log(this.app.mysql);
      const resutl = await this.app.mysql.insert('user', user);
      return { resutl };
    }
  }

  module.exports = UserService;